package com.xiaoq;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.xiaoq.web.DefaultMapper;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * Created by chenjh on 2018/3/3.
 */

@EnableScheduling
@SpringBootApplication(scanBasePackages = {"com.xiaoq"})
public class ScheduleApplication {

    public static void main(String[] args) {
        SpringApplication.run(ScheduleApplication.class, args);
    }

    @Bean
    @Primary
    public ObjectMapper serializingObjectMapper() {
        ObjectMapper objectMapper = new DefaultMapper();
        return objectMapper;
    }

}